<?php if($data){ ?>
<div id="sanpham_right">
           	    <div id="title_right">
            		<p id="title_right_left"></p>
            		<div id="title_right_center">
            		  <p class="chu_title">CHI TIẾT NHẬP</p>
            		</div>
           			<p id="title_right_right"></p>
             	</div>
                <div id="noidung_right">
                <!-- gio hang -->
                	<form name="update" action="" method="post" >
							<div id="con_giohang">
                            	<table width="700" cellspacing="0" cellpadding="0" border="1" class="table_cart">
                                      <tr class="bg_cart_giohang" height="30px" >
                                        <td width = "150" valign = "top"> <div align = "center"> <b> Nhà cung cấp </b> </div> </td>
				<td width = "150" valign = "top"> <div align = "center"> <b> Mặt hàng  </b> </div> </td>
				<td width = "150" valign = "top"> <div align = "center"> <b> Đơn giá nhập  </b> </div> </td>
				<td width = "150" valign = "top"> <div align = "center"> <b> Số lượng </b> </div> </td>
				<td width = "150" valign = "top"> <div align = "center"> <b> Ngày nhập  </b> </div> </td>
				<td width = "80" valign = "top"> <div align = "center"> <img src="public/images/b_edit.png"/> Sửa</div> </td>
				<td width = "80" valign = "top"> <div align = "center"> <img src="public/images/b_drop.png"/> Xóa </div> </td>
                                      </tr>
                                     <?php foreach ($data['list'] as $key => $value) { ?>
			<tr> 
				<td width = "150" valign = "top"> <div align = "center">
					<?php 
						if(is_array($data['listncc'])){
							foreach ($data['listncc'] as $item){
								if($item['MaNCC'] == $value['MaNCC']){
									echo $item['TenNCC'];
								}
							}
						}
					?>
				</div> </td>
				<td width = "150" valign = "top"> <div align = "center">
					<?php 
						if(is_array($data['listmathang'])){
							foreach ($data['listmathang'] as $item){
								if($item['MaMH'] == $value['MaMH']){
									echo $item['TenMH'];
								}
							}
						}
					?>
				</div> </td>
				<td width = "150" valign = "top"> <div align = "center"><?php echo $value['DonGiaNhap']?></div> </td>
				<td width = "150" valign = "top"> <div align = "center"><?php echo $value['SoLuongNhap'];?></div> </td>
				<td width = "150" valign = "top"> <div align = "center"><?php echo $value['NgayNhap'];?></div> </td>
				<td width = "80" valign = "top"> <div align = "center"> <a href = "admin.php?mod=edit_ctnhap&id=<?php echo $value['MaCTN'];?>"> Sữa </a></div> </td>
				<td width = "80" valign = "top"> <div align = "center"> <a href = "admin.php?mod=del_ctnhap&id=<?php echo $value['MaCTN'];?>"> Xóa </a> </div> </td>
			</tr>
		<?php } ?>
		</table>
                  </div>
                           
					</form>
                    <!-- end -->
                </div>
           </div>
           <?php }?>